import { trigger, state, animate, style, transition } from '@angular/animations';

export const flyInOut = trigger('flyInOut', [
    state('in', style({
        opacity: 1,
        transform: 'translateX(0)'
    })),
    transition('void => *', [
        style({
            opacity: 0,
            transform: 'translateX(100%)'
        }),
        animate(200)
    ]),
    transition('* => void', [
        animate(200, style({
            opacity: 0,
            transform: 'translateX(100%)'
        }))
    ])
])